package com.example.api.service;

import com.example.api.model.dto.LoginDto;
import com.example.api.model.entity.Admin;
import com.example.api.model.support.RespBean;
import org.springframework.security.core.Authentication;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

public interface AdminService {

    RespBean sendEmail(String email);

    RespBean delete(Integer id);

    RespBean selectByRoleId(Integer roleId);

    RespBean init(Admin admin);

    RespBean save(Admin admin) throws Exception;

    List<Admin> findAll(String name);

    RespBean login(LoginDto dto) throws Exception;

    Admin getAdminInfo(String username);

    RespBean updatePassword(Map<String, Object> info);

    RespBean update(Admin admin, Authentication authentication);

    RespBean updateAdminRole(Integer aid, Integer[] rids);

    RespBean initPassword(Integer id);

    RespBean updateAvatar(MultipartFile file, Integer id, Authentication authentication) throws Exception;

}